package com.mangguo.tingjian.common;

public class ResultStatus {
    private int status;
    private String message;
    // 按照模块定义CodeMsg
    // 通用异常
    public static ResultStatus SUCCESS = new ResultStatus(200,"success");


    public static ResultStatus SERVER_EXCEPTION = new ResultStatus(500,"服务端异常");


    public static ResultStatus PARAMETER_ISNULL = new ResultStatus(301,"参数异常");
    // 业务异常
    public static ResultStatus USER_NOT_EXISTS = new ResultStatus(400,"用户不存在");

    private ResultStatus(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
}
